﻿using System;
using NHBussines.Interfaces;

namespace NHBussines
{
    public abstract class BussinesFactory
    {
        public static Type BUSSINESS_FACTORY = typeof (FrameworkBussinesFactory);
        public static FrameworkBussinesFactory Instance(Type factory)
        {
            try
            {
                return (FrameworkBussinesFactory) Activator.CreateInstance(factory);
            }
            catch (Exception)
            {
                
                throw new Exception("No se pudo crear BussinessFactory:"+factory);
            }
        }
        public abstract IRoleController GetRoleController();
        public abstract IUserController GetUserController();
        public abstract IUserRoleController GetUserRoleController();
    }
}